/*
 * Copyright (c) 2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef SWANLINK_FINANCE_CARDSENDER_INTERFACES_INNERKITS_NATIVE_INCLUDE_ICARDSENDER_SRV_H
#define SWANLINK_FINANCE_CARDSENDER_INTERFACES_INNERKITS_NATIVE_INCLUDE_ICARDSENDER_SRV_H

#include <string>
#include "iremote_broker.h"
#include "iremote_object.h"
#include "cardsender_def.h"
#include "cashdevice_def.h"
namespace SwanLink {
namespace Finance {

class ICardsenderSrv: public OHOS::IRemoteBroker {
 public:
    enum {
        CARDSENDER_OPEN,
        CARDSENDER_CLOSE,
        CARDSENDER_RESET,
        CARDSENDER_DISPENSECARD,
        CARDSENDER_GETSUPPORTACCESS,
        CARDSENDER_QUERYSTATUS
    };


    /**
     * 串口建立连接
     */
    virtual int Open(const std::string& name, const Transport& trans) = 0;
    /**
     * 断开连接
     */
    virtual int Close(int handle) = 0;
    /**
     * 复位发卡设备
     */
    virtual int Reset(int handle) = 0;
    /**
     * 从卡箱发卡
     */
    virtual int DispenseCard(int handle) = 0;
    /**
     * 获取支持的设备接入参数列表
     */
    virtual std::vector<DevAccess> GetSupportAccess() = 0;
    /**
     * 获取设备状态。
     */
    virtual int QueryStatus(int handle, int *pSuppBinStat, int *pRetainBinStat) = 0;

 public:
    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.finance.ICardsenderSrv");
};
}  // namespace Finance
}  // namespace SwanLink

#endif // SWANLINK_FINANCE_CARDSENDER_INTERFACES_INNERKITS_NATIVE_INCLUDE_ICARDSENDER_SRV_H
